/*    */ package com.lmpop.trade.util;
/*    */ 
/*    */ import com.lmpop.frame.SysMap;
/*    */ import com.lmpop.frame.dao.DbmInterf;
/*    */ import com.lmpop.frame.util.PropertiesConfigUtil;
/*    */ import java.util.Hashtable;
/*    */ import java.util.Iterator;
/*    */ import java.util.Map;
/*    */ 
/*    */ public class UpdateConfig
/*    */ {
/* 11 */   private PropertiesConfigUtil config = null;
/*    */ 
/*    */   public SysMap update(DbmInterf dbmMgr, SysMap map) {
/* 14 */     String configName = map.getString("config_name");
/* 15 */     this.config = new PropertiesConfigUtil(configName);
/* 16 */     Map updateMap = new Hashtable();
/* 17 */     Iterator iterator = this.config.getKeys();
/* 18 */     while (iterator.hasNext()) {
/* 19 */       String key = (String)iterator.next();
/* 20 */       String value = map.getString(key);
/* 21 */       updateMap.put(key, value);
/*    */     }
/*    */ 
/* 24 */     this.config.setProperty(updateMap);
/* 25 */     this.config.save();
/*    */ 
/* 27 */     String result_code = "0";
/* 28 */     map.setString("result_code", result_code);
/* 29 */     return map;
/*    */   }
/*    */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.util.UpdateConfig
 * JD-Core Version:    0.6.0
 */